As it relates to film and photography, depth of field is the distance between the nearest and farthest objects in a scene that appear acceptably sharp in an image. Although a lens can precisely focus at only one distance at a time, the decrease in sharpness is gradual on each side of the focused distance, so that within the depth of field, the imperfections in focus are imperceptible under normal viewing conditions. Auto-focus may be used to adjust the focus position of the lens, but auto-focus may cause the lens to focus at the wrong distance, to change focus during image capture, or to create other possible problems.
In some cases, it may be desirable to have the entire image sharp, and a large depth of field is appropriate. However, the depth of field for a scene is affected by various parameters including the focal length of the lens, the f-number of the optical system, the distance between the camera and the subject, and the size of the image sensor. These parameters may be determined or limited by the environment of the scene to be captured and the equipment available to perform the image capture. In some circumstances, it may be desirable to have a larger depth of field than is permitted by the scene and the imaging equipment. As a result, portions of the image may appear sharp, while others are undesirably out of focus.